<?php
namespace app\admin\controller;
use think\view;
use think\Db;
class Index extends CommonController
{
    public function index()
    {

        //判断有多少技术需要审核
        $count = DB::name('developer')
            ->where(array(
                'state'=>1
            ))
            ->count(); //计算记录数
//        echo $count;
        $this->assign('count',$count);
        return $this->fetch();
    }
    public function welcome()
    {
        $view = new View();
        // 环境获取
        $data['php_version'] =  PHP_VERSION;
        $data['ip'] = $_SERVER['REMOTE_ADDR'];
//        $data['apache_version'] = apache_get_version();
//        $data['mysql_version'] = mysqli_get_server_info(mysqli_connect("127.0.0.1", "root", "root", "fang"));
        $data['os'] = PHP_OS;
        $data['time'] =  date("Y-m-d H:i:s");
        $view->assign('data',$data);
        return $view->fetch();
    }

}
